import {InterfaceUser} from '@/interface/InterfaceUser';

export default class UserEntity {
    private readonly originalData: InterfaceUser;

    public constructor(arg: InterfaceUser) {

        this.originalData = arg;
    }

    public get getBaseInfo(): any {
        return {
            nickName: this.originalData.nickname,
            avatar_id: this.originalData.avatarId,
            alipay: this.originalData.alipay,
            alipay_name: this.originalData.alipayName,
            city_id: this.originalData.cityId,
            district_id: this.originalData.districtId,
            province_id: this.originalData.provinceId,
            snap_city_id: this.originalData.snapCityId,
            snap_district_id: this.originalData.snapDistrictId,
            snap_province_id: this.originalData.snapProvinceId,
            wxpay: this.originalData.wxpay
        };
    }

    public get getBaseInfoExcludeSex(): any {
        const baseInfo: any = this.getBaseInfo;
        delete baseInfo.gender;
        return baseInfo;
    }


}
